package com.smartinput.dto

import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.annotation.JsonIgnoreProperties

@JsonIgnoreProperties(ignoreUnknown = true)
data class WebSocketMessageDto @JsonCreator constructor(
    @JsonProperty("type") val type: String,
    @JsonProperty("data") val data: Any? = null,
    @JsonProperty("timestamp") val timestamp: Long = System.currentTimeMillis()
)

data class WebSocketMessage(
    val type: String,
    val data: Any,
    val timestamp: Long = System.currentTimeMillis()
)

data class TextPushData(
    val targetDeviceId: String,
    val content: String,
    val sourceDeviceId: String
)

data class VoiceStreamData(
    val audioData: String,
    val isFinal: Boolean,
    val deviceId: String
)

data class DeviceHeartbeatData(
    val deviceId: String
)

data class TextReceivedData(
    val content: String,
    val sourceDeviceId: String,
    val timestamp: Long
)

data class ErrorData(
    val message: String,
    val code: String? = null
) 